﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TByte.XnaHelper.GameObjects;
using Microsoft.Xna.Framework.Graphics;

namespace TByte.XnaHelper.GameObjects
{
    public class TextGameObject : GameObject
    {
        #region Fields
        string text;
        SpriteFont font;
        #endregion

        #region Methods
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.DrawString(font, text, Position, color);

            base.Draw(spriteBatch);
        }
        #endregion

        #region Constructors
        public TextGameObject(string text, SpriteFont font, string name)
            : base(name)
        {
            this.text = text;
            this.font = font;
        }
        #endregion

        #region Properties
        public String Text { get { return text; } set { text = value; } }
        public SpriteFont Font { get { return font; } set { font = value; } }
        #endregion
    }
}
